import http from "@/libs/http";
class TableServer {
  async getAll() {
    return await http.get("/table/index", {});
  }

  async add(row) {
    return await http.post("/table/add", row);
  }

  async edit(row) {
    return await http.post("/table/edit", row);
  }

  async del(row, callback) {
    return await http.post("/table/del", row);
  }

  async autoApi(id) {
    return await http.get("/template/api", { id: id });
  }

  async autoDb(id) {
    return await http.get("/template/autoDb", { id: id });
  }
}

const tableServer = new TableServer();
export default tableServer;
